package bufferedStream;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class Demo3 {
    public static void main(String[] args) throws IOException {
        //字符流缓冲区写入内容换行
        BufferedWriter bw = new BufferedWriter(new FileWriter("IODemo\\Tom.txt"));
        //写入内容
        bw.write("你好");
        //换行
        bw.newLine();
        bw.write("再见");
        //关闭流
        bw.close();
    }
}
